import ajax from '@/api/apiConfig.js'
const isDev=process.env.NODE_ENV === 'development'

export const requestLogin = (data) => {
  return ajax.post('user/login', data)
}

export const getUserInfor = (data) => {
  return ajax.get('user/getUser', data)
}

export const logout = (data) => {
  return ajax.post('user/logout', data)
}
/* 更新用户信息 */
export const updateUserInfo = (data) => {
  return ajax.post('user/updateBasic', data)
}
/* 密码修改 */
export const updatePwd = (data) => {
  return ajax.post('user/updatePwd', data)
}
/* 发送验证码 */
export const sendVerifyCode = (data) => {
  return ajax.post('user/sendVerifyCode', data)
}
/* 忘记密码 */
export const forgetPwd = (data) => {
  return ajax.post('user/forgetPwd', data)
}
/* 用户列表 */
export const getUsers = (data) => {
  return ajax.get('user/getUsers', data)
}
/* 获取分平台key */
export const findOrgByOrgCode = (data) => {
  return ajax.get('version/findOrgByOrgCode', data)
}
/* app二维码 */
export const getNewAppV = (data) => {
  return ajax.get('version/getNewAppV', data)
}
/* 获取七牛token */
export const qnToken = (data) => {
  return ajax.get('img/qnToken', data)
}
// 只通过账号登录
export const loginByAccount = (data) => {
  return ajax.post('user/loginByAccount', data)
}